<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>新年倒计时</title>
    <style>
        body {
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            font-family: Arial, sans-serif;
        }
        #countdown {
            font-size: 2em;
        }
    </style>
</head>
<body>
    <div id="countdown"></div>
    <script>
        // 设置目标时间为新年
        const targetDate = new Date('2025-01-01T00:00:00');

        // 更新倒计时的函数
        function updateCountdown() {
            const now = new Date();
            const timeDifference = targetDate - now;

            if (timeDifference <= 0) {
                // 倒计时结束，跳转到指定页面
                window.location.href = 'https://happy.zeabur.app';
                return;
            }

            const days = Math.floor(timeDifference / (1000 * 60 * 60 * 24));
            const hours = Math.floor((timeDifference % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
            const minutes = Math.floor((timeDifference % (1000 * 60 * 60)) / (1000 * 60));
            const seconds = Math.floor((timeDifference % (1000 * 60)) / 1000);

            const countdownElement = document.getElementById('countdown');
            countdownElement.innerHTML = `${days}天 ${hours}小时 ${minutes}分钟 ${seconds}秒`;
        }

        // 每秒更新一次倒计时
        setInterval(updateCountdown, 1000);
    </script>
</body>
</html>
